package bufftered;



import java.io.BufferedWriter;
import java.io.FileWriter;
import java.io.Writer;

public class BufferedTest3 {
    public static  void main(String[] args)  {
        try (
                // 创建一个文件字符输出通报于目标文件接通
                Writer fw = new FileWriter("C:\\Users\\zjd\\IdeaProjects\\java\\src\\itheima.05out.txt",true);
                BufferedWriter bw = new BufferedWriter(fw);

        ){
            //  写一个字符进去
            bw.write(97);
            bw.write('张');
            bw.write('a');
            bw.newLine();// 自带的换行方法

            // 写一串字符进去
            bw.write("张家动123");
            bw.newLine();


        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}